const arr = [1, 2, 3];

// idea1
arr.reduce((prev, cur) => {
    return prev.then(() => {
        return new Promise(resolve => {
            setTimeout(() => resolve(console.log(cur)), 1000);
        })
    })
}, Promise.resolve())